package dormouse.vfs.ui.actions;



import org.apache.commons.vfs2.FileObject;
import org.jdesktop.application.Application;

import dormouse.Dormouse;
import dormouse.DormouseView;


/**
 * This action is responsible for going up one directory level.
 */
public class UpAction extends AbstractFileTask {
	
	/**
	 * Constructor
	 * @param app
	 */
	public UpAction(Application app){
		super(app);
	}

    @Override
    protected Object doInBackground() throws Exception {
        Dormouse exp = (Dormouse) this.getApplication();
        DormouseView view = (DormouseView)exp.getMainView();
        FileObject currDir = view.getLocation();
        FileObject parent = currDir.getParent();
        view.setLocation(parent);
        return null;
    }



}
